﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using OBUCare.Core.Common;

namespace OBUCare.Web.Models
{
    /// <summary>
    /// 厂商返回数据的数据模型
    /// </summary>
    public class ImportExcelDataViewModel
    {
        [DisplayName("序号")]
        public int Index { get; set; }

        [DisplayName("返回日期")]
        public DateTime? ReturnDate { get; set; }

        [DisplayName("厂商")]
        public string Supplier { get; set; }

        [DisplayName("维修单号")]
        public string RepairNo { get; set; }

        [DisplayName("标签号")]
        public string OBU_NO { get; set; }       

        [DisplayName("故障点")]
        public string Fault1 { get; set; }

        [DisplayName("故障点")]
        public string Fault2 { get; set; }

        [DisplayName("故障点")]
        public string Fault3 { get; set; }

        [DisplayName("故障点")]
        public string Fault4 { get; set; }

        [DisplayName("故障点")]
        public string Fault5 { get; set; }

        [DisplayName("故障点")]
        public string Fault6 { get; set; }

        [DisplayName("故障点")]
        public string Fault7 { get; set; }

        [DisplayName("故障点")]
        public string Fault8 { get; set; }

        [DisplayName("故障点")]
        public string Fault9 { get; set; }

        [DisplayName("故障点")]
        public string Fault10 { get; set; }

        [DisplayName("故障点")]
        public string Fault11 { get; set; }

        [DisplayName("故障点")]
        public string Fault12 { get; set; }

        [DisplayName("故障点")]
        public string Fault13 { get; set; }

        [DisplayName("故障点")]
        public string Fault14 { get; set; }

        [DisplayName("故障点")]
        public string Fault15 { get; set; }

        [DisplayName("故障点")]
        public string Fault16 { get; set; }

        [DisplayName("故障点")]
        public string Fault17 { get; set; }

        [DisplayName("故障点")]
        public string Fault18 { get; set; }

        [DisplayName("故障点")]
        public string Fault19 { get; set; }

        [DisplayName("故障点")]
        public string Fault20 { get; set; }

        [DisplayName("厂商处理意见")]
        public string DISPOSE_TYPE { get; set; } //厂商处理意见(是:表示能维修/否：表示无法维修/置换) 

        [DisplayName("备注")]
        public string remark { get; set; }

        public string this[int faultIndex]
        {
            get
            {
                return this.GetValue("Fault" + faultIndex.ToText()).ToText();    
            }
            set
            {
                 this.SetValue("Fault" + faultIndex.ToText(),value,null);
            }
        }
    }
}